package day08.Ti;

import java.util.*;

public class Ti02Set {
    public static void main(String[] args) {
        Set<String>ts=new HashSet<>();
        ts.add("刘备");
        ts.add("关羽");
        ts.add("张飞");
        ts.add("刘备");
        ts.add("张飞");
        System.out.println(ts.size());
        Iterator<String> it = ts.iterator();
        while (it.hasNext()){
            String s = it.next();
            System.out.println(s);
        }
        System.out.println("--------");
        for (String t : ts) {
            System.out.println(t);
        }
    }
}
